Ext.define('admin.controller.adminController', {
    extend: 'Ext.app.Controller',
    stores: ["adminMenuStore"],
    models: ['adminMenuModel'],
    views: ['Viewport','main.adminLayout','main.adminHeader','main.adminMenu'],
    control:{
        'button[action=userLogout]': {
            click: 'userLogout'
        },
        'adminMenuTreePanel':{
            render:'expandAllMenuTree'
        }
    },
    userLogout:function(){
        Ext.Msg.confirm("确认","您确认要注销当前登录用户吗?",function(btn){
            if(btn=="yes"){
                window.location = "login";
            }
        })
    },
    expandAllMenuTree:function(e){
        e.expandAll();
    }
});
